package com.cloudfast.platform.app.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import com.cloudfast.dao.BaseDao;
import com.cloudfast.dao.impl.BaseDaoImpl;
import com.cloudfast.platform.app.AppClient;

/**
 * app 配置
 *
 * @author liuyw
 * @date 2022年9月11日
 */
public interface AppDao extends BaseCustomer, JpaRepository<AppClient, Long> {

    /**
     * 根据applabel 查询app信息
     *
     * @param appLabel
     * @param appType
     * @return
     */
    @Query("from AppClient where appLabel=?1 and corpId=?2 and appType=?3 ")
    public AppClient findOneByAppLabel(String appLabel, String corpId, String appType);

}

interface BaseCustomer extends BaseDao<AppClient, Long> {

}

@Repository
class AppDaoImpl extends BaseDaoImpl<AppClient, Long> implements BaseCustomer {

}